package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.ThumbsUpMapper;
import com.education.wisdom.pojo.ThumbsUp;
import com.education.wisdom.service.IThumbsUpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 点赞记录 服务层实现
 * 
 * @author ruoyi
 * @date 2018-11-12
 */
@Service
public class ThumbsUpServiceImpl implements IThumbsUpService
{
	@Autowired
	private ThumbsUpMapper thumbsUpMapper;

	/**
     * 查询点赞记录信息
     * 
     * @param dzId 点赞记录ID
     * @return 点赞记录信息
     */
    @Override
	public ThumbsUp selectThumbsUpById(String dzId)
	{
	    return thumbsUpMapper.selectThumbsUpById(dzId);
	}
	
	/**
     * 查询点赞记录列表
     * 
     * @param thumbsUp 点赞记录信息
     * @return 点赞记录集合
     */
	@Override
	public List<ThumbsUp> selectThumbsUpList(ThumbsUp thumbsUp)
	{
	    return thumbsUpMapper.selectThumbsUpList(thumbsUp);
	}
	
    /**
     * 新增点赞记录
     * 
     * @param thumbsUp 点赞记录信息
     * @return 结果
     */
	@Override
	public int insertThumbsUp(ThumbsUp thumbsUp)
	{
	    return thumbsUpMapper.insertThumbsUp(thumbsUp);
	}
	
	/**
     * 修改点赞记录
     * 
     * @param thumbsUp 点赞记录信息
     * @return 结果
     */
	@Override
	public int updateThumbsUp(Map<String, Object> map)
	{
	    return thumbsUpMapper.updateThumbsUp(map);
	}

	/**
     * 删除点赞记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteThumbsUpByIds(String ids)
	{
		return thumbsUpMapper.deleteThumbsUpByIds(Convert.toStrArray(ids));
	}

	@Override
	public ThumbsUp selectIsthumbsUp(Map<String, Object> map) {
		return thumbsUpMapper.selectIsthumbsUp(map);
	}

	@Override
	public int updateThumbsUps(Map<String, Object> map) {
		return thumbsUpMapper.updateThumbsUps(map);
	}

	@Override
	public ThumbsUp selectIsthumbsUps(Map<String, Object> map) {
		return thumbsUpMapper.selectIsthumbsUps(map);
	}

	@Override
	public int selectcount(Map<String, Object> map) {
		return thumbsUpMapper.selectcount(map);
	}
	
}
